package my.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Person implements Comparable<Person> {

    private String name;
    private int boneBreak;

    /**
     * 谁的骨头断的多就优先救谁
     */
    @Override
    public int compareTo(Person person) {
        return this.boneBreak - person.boneBreak;
    }

}
